package cn.szzsi.service;

import cn.szzsi.common.model.Member;
import cn.szzsi.common.model.Message;
import com.jfinal.kit.StrKit;

/**
 * Service实现类 - 站内信服务
 * 
 */
public class MessageService {
	public static final MessageService me = new MessageService();

	/**
	 * 检测这条信息是否发给真正的会员
	 * @param msg
	 * @param member
	 * @return
	 */
	public boolean checkMsgToRightMember(Message msg, Member member){
		boolean flag = false;
		if (StrKit.notBlank(msg.getStr("id"))){
			if (msg.getToMember().getStr("id").equals(member.getStr("id")) ) {
				flag = true;
			}
		}
		return flag;
	}
}